how to create dict key with list default -2

30

dict_x = {}

...

dict_x.setdefault(key, []).append(value)

Comments

Submit
0 Comments